-- GENERATED SPELL FOR [Rajis Fyashe] --


function spell0_18044(pUnit, Event) --@Freezing Circle,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(34787,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_18044', 1, 1)
end

function spell1_18044(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18044', 7000, 1)
end

function spell2_18044(pUnit, Event) --@Mass Elementals,Self--
pUnit:FullCastSpellOnTarget(35594,pUnit)
pUnit:RegisterEvent('Sorts_18044', 596, 1)
end

function spell3_18044(pUnit, Event) --@Water Spout,n/a--
pUnit:FullCastSpellOnTarget(35499,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18044', 513, 1)
end

function Sorts_18044(pUnit, Event)
local choix_sorts_18044 = math.random(0, 3)
if choix_sorts_18044 == 0 then
pUnit:RegisterEvent('spell0_18044', 1, 1)
end
if choix_sorts_18044 == 1 then
pUnit:RegisterEvent('spell1_18044', 1, 1)
end
if choix_sorts_18044 == 2 then
pUnit:RegisterEvent('spell2_18044', 1, 1)
end
if choix_sorts_18044 == 3 then
pUnit:RegisterEvent('spell3_18044', 1, 1)
end
end

function mob18044_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18044', math.random(1500, 3000), 1)
end

function mob18044_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18044_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18044_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18044, 1, 'mob18044_Action')
RegisterUnitEvent(18044, 2, 'mob18044_Leave')
RegisterUnitEvent(18044, 3, 'mob18044_Kill')
RegisterUnitEvent(18044, 4, 'mob18044_Die')
